package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ReInfoMapper;
import com.ruoyi.system.domain.ReInfo;
import com.ruoyi.system.service.IReInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 预约开户记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-21
 */
@Service
public class ReInfoServiceImpl implements IReInfoService 
{
    @Autowired
    private ReInfoMapper reInfoMapper;

    /**
     * 查询预约开户记录
     * 
     * @param id 预约开户记录主键
     * @return 预约开户记录
     */
    @Override
    public ReInfo selectReInfoById(Long id)
    {
        return reInfoMapper.selectReInfoById(id);
    }

    /**
     * 查询预约开户记录
     *
     * @param reNumber 预约开户记录主键
     * @return 预约开户记录
     */
    @Override
    public ReInfo selectReInfoByreNumber(String reNumber)
    {
        return reInfoMapper.selectReInfoByreNumber(reNumber);
    }

    /**
     * 查询预约开户记录列表
     * 
     * @param reInfo 预约开户记录
     * @return 预约开户记录
     */
    @Override
    public List<ReInfo> selectReInfoList(ReInfo reInfo)
    {
        return reInfoMapper.selectReInfoList(reInfo);
    }

    /**
     * 新增预约开户记录
     * 
     * @param reInfo 预约开户记录
     * @return 结果
     */
    @Override
    public int insertReInfo(ReInfo reInfo)
    {
        reInfo.setCreateTime(DateUtils.getNowDate());
        return reInfoMapper.insertReInfo(reInfo);
    }

    /**
     * 修改预约开户记录
     * 
     * @param reInfo 预约开户记录
     * @return 结果
     */
    @Override
    public int updateReInfo(ReInfo reInfo)
    {
        reInfo.setUpdateTime(DateUtils.getNowDate());
        return reInfoMapper.updateReInfo(reInfo);
    }

    /**
     * 批量删除预约开户记录
     * 
     * @param ids 需要删除的预约开户记录主键
     * @return 结果
     */
    @Override
    public int deleteReInfoByIds(String ids)
    {
        return reInfoMapper.deleteReInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除预约开户记录信息
     * 
     * @param id 预约开户记录主键
     * @return 结果
     */
    @Override
    public int deleteReInfoById(String id)
    {
        return reInfoMapper.deleteReInfoById(id);
    }

    /**
     * 查询预约开户记录
     *
     * @param openId 预约开户记录主键
     * @return 预约开户记录
     */
    @Override
    public ReInfo selectReInfoByOpneId(String openId)
    {
        return reInfoMapper.selectReInfoByOpneId(openId);
    }


    @Override
    public ReInfo selectReInfoByUserId(Long userId)
    {
        return reInfoMapper.selectReInfoByUserId(userId);
    }
}
